package com.bjwl.service.impl;

import com.bjwl.dao.CardStripMapper;
import com.bjwl.pojo.CardStrip;
import com.bjwl.pojo.Orders;
import com.bjwl.service.CardStripService;
import com.bjwl.utils.PageBean;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @Author: czc
 * @Date:Create：in 2020/5/13 19:30
 * @Description:
 * @Modified By：
 * @Version: 1.0
 */
@Service
public class CardStripServiceImpl implements CardStripService {

    @Autowired
    private CardStripMapper cardStripMapper;

    @Override
    public void insertCardStrip(CardStrip cardStrip) {
        cardStripMapper.insertCardStrip(cardStrip);
    }

    @Override
    public List<CardStrip> findAllCardStrip() {
        return cardStripMapper.findAllCardStrip();
    }

    @Override
    public PageBean<CardStrip> findCardStripBybsid(Integer pageNum, Integer bsid, Integer cardstripid, String cardstripvalue, String wstarttime, String wendtime) {
        PageBean<CardStrip> pageBean = new PageBean<CardStrip>(pageNum,10,cardStripMapper.cardStripPaging(bsid,cardstripid,cardstripvalue,wstarttime,wendtime));
        pageBean.setData(cardStripMapper.findCardStripBybsid(pageBean,bsid,cardstripid,cardstripvalue,wstarttime,wendtime));
        return pageBean;
    }

    @Override
    public CardStrip jumpCardStripEdit(Integer id) {
        return cardStripMapper.jumpCardStripEdit(id);
    }

    @Override
    public void deleteCardStrip(Integer id) {
        cardStripMapper.deleteCardStrip(id);
    }

    @Override
    public void updateCardStripByid(CardStrip cardStrip) {
        cardStripMapper.updateCardStripByid(cardStrip);
    }
}
